Import Libraries
library("jsonlite")
library("ggplot2")
library("readr")
setwd("~/Documents/Project/YelpAnalysis/")
Import Business Dataset
business <- "dataset/business.json"
review <-read_lines(business, n_max = 200000)
business.df <- fromJSON(paste("[", paste(review, collapse = ","), "]"))
business.df <- flatten(business.df)
business.df
Investigate variable correlations with MCMC regression
Encode all the caterogries
# one-hot-encode all the categories
library(qdapTools)
categories <- mtabulate(business.df$categories)
categories